/*
 * Triangle.h
 *
 *  Created on: 29 août 2010
 *      Author: seeme
 *      Une face == 3 points + une normal (plus les uvs plus tard :) )
 */

#ifndef TRIANGLE_H_
#define TRIANGLE_H_

template <typename T>
class Triangle {
	public:

		Triangle(T &p1, T &p2, T &p3): m_p1(p1), m_p2(p2), m_p3(p3){};
		Triangle(T p1, T p2, T p3): m_p1(p1), m_p2(p2), m_p3(p3){};
		Triangle(const Triangle& t): m_p1(t.m_p1), m_p2(t.m_p2), m_p3(t.m_p3){};
		Triangle(){};
		~Triangle(){};

		T m_p1, m_p2, m_p3;

		friend std::ostream& operator<<(std::ostream& out, const Triangle& t){
			t.print(out);
			return out;
		}

		virtual void print(std::ostream& o) const {
			o << "Triangle(" << m_p1 << ", " << m_p2 << ", " << m_p3 << ");";
		}
};

#endif /* TRIANGLE_H_ */


